package org.bjou

//分校
class Branch {
    
    String branchName
    String branchType
    
    static hasMany = [ users: ShiroUser]
    

    static constraints = {
        branchName(nullable: true, blank: true)
        branchType(nullable: true, blank: true)
    }
    
    static namedQueries = {
        findByUser {
            userId ->
            users {
                eq 'id', userId
            }
        }
    }
}
